package com.example.shop.user.dto;

import com.example.shop.pojo.UserAddressBook;
import com.fasterxml.uuid.Generators;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ModifyLinkmanParam extends AddLinkmanParam{
    //联系人id
    @NotNull
    private Long linkmanId;

    @Override
    public UserAddressBook getUserAddressBook() {
        UserAddressBook userAddressBook = super.getUserAddressBook();
        userAddressBook.setLinkmanId(linkmanId);
        return userAddressBook;
    }

    @Override
    public String toString() {
        return "ModifyLinkmanParam{" +
                super.toString() +
                "linkmanId=" + linkmanId +
                '}';
    }
}
